package com.changgou.order.feign;

import com.changgou.entity.Result;
import com.changgou.order.pojo.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(name="order")
public interface CartFeign {
	@GetMapping("/cart/add")
	public Result add(@RequestParam("skuId") String skuId, @RequestParam("num") Integer num);
	@GetMapping("/cart/list")
	public Map list();
	@PostMapping("/cart")
	public Result addCol(@RequestParam("skuId") String skuId);
	@PostMapping("/order")
	public Result addOrder(@RequestBody Order order);
	@GetMapping("/order/{id}")
	public Result<Order> findById(@PathVariable("id") String id);

	@GetMapping("/mycollection/listmycollection")
	public Result listCollection();
	@PostMapping("/footmark/add")
	public Result addMyFootMark(@RequestParam("skuId") String skuId);
	@GetMapping("/footmark/myfootmark")
	public Result listFootMark();
	@GetMapping("/order/findAllItemByOrder")
	public Result findAllItemByOrder();

	@PutMapping("/order/take/{orderId}/operator/{operator}")
	public Result take(@PathVariable("orderId") String orderId, @PathVariable("operator") String operator);

	@RequestMapping("/order/closeOrder/{orderId}")
	public Result closeOrder1(@PathVariable("orderId")String orderId);
}
